package ooday03;

public class TextDemo {
    public static void main(String[] args) {
     Dog[] dogs=new Dog[3];
     dogs[0]=new Dog("大黄","绿色",3);
     dogs[1]=new Dog("二哈","白色",1);
     dogs[2]=new Dog("龟公","蓝色",3);
     for(int i=0;i<dogs.length;i++){
         System.out.println(dogs[i].name);
         dogs[i].eat();
     }
     System.out.println(dogs[1].name);
     Fish[] fish=new Fish[2];
     fish[0]=new Fish("红鲤鱼","绿色",2);
     fish[1]=new Fish("绿鲤鱼","红色",3);
     for(int i=0;i<fish.length;i++){
         fish[i].drink();
         System.out.println(fish[i].color);
     }
    Chick[] chicks=new Chick[3];
     chicks[0]=new Chick("小鸡","黄色",2);
     chicks[1]=new Chick("小鸡鸡","黑色",1);
        chicks[2]=new Chick("凤凰","白色",3);
        chicks[3]=new Chick("鲲鹏","五颜六色",4);
     for(int i=0;i<chicks.length;i++){
         chicks[i].drink();
         System.out.println(chicks[i].name);
     }




    }

}
